#include <stdio.h>

int main()
{
  int idx1, idx2;
  idx1 = 0;
  idx2 = 0;
  scanf("%d %d");

  switch (idx1) {
    case 0: return 0x800;
    case 1: return 0x700;
    case 2: return 0xc00;
    case 3: return 0x500;
    case 4: return 0xa00;
    case 5: return 0x300;
    case 6: return 0x200;
    case 7: return 0x100;
    default: return -1; 
  }

  switch (idx2) {
    case 0: return 0x800;
    case 1: return 0x700;
    case 2: return 0xc00;
    case 3: return 0x500;
    case 4: return 0xa00;
    case 5: return 0x300;
    case 6: return 0x200;
    case 7: return 0x100;
    default: return -1; 
  }

  return 0;
}
